package datastructure;

import utils.DateTimeUtils;

import java.util.Date;

/**
 * Author: Jason Wu
 * Date  : 2013-11-27
 */
public class PushTask implements Runnable {
    private int index;

    public PushTask(int index) {
        this.index = index;
    }

    @Override
    public void run() {
        try {
            Thread.sleep(2000);
            System.out.println(String.format("TaskIndex:%d, time:%s finished !!", index, DateTimeUtils.formatDate(new Date(), DateTimeUtils.DATE_TIME_FORMAT)));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
